<%-- Created by IntelliJ IDEA. --%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
  <head>
    <title></title>
  </head>
  <body>
        <div><h1>在线通讯录</h1></div>
        <div>
          <form action="${pageContext.request.contextPath}/contact/list">
            查找联系人:<input type="text" name="cname" value="${cname}">
            <input type="submit" value="查找">&nbsp;<a href="${pageContext.request.contextPath}
            /contact/toAdd">添加联系人</a>
          </form>
          <div><h3>${name}</h3></div>
        </div>
      <table border="1">
          <tr>
            <th>序号</th>
            <th>姓名</th>
            <th>手机</th>
            <th>QQ</th>
            <th>Email</th>
            <th>地址</th>
          </tr>
        <c:forEach items="${list}" var="a">
          <tr>
            <td>${a.id}</td>
            <td>${a.cname}</td>
            <td>${a.mobile}</td>
            <td>${a.qq}</td>
            <td>${a.email}</td>
            <td>${a.address}</td>
          </tr>
        </c:forEach>
      </table>
  <script src="../../js/jquery-1.8.3.js"></script>
  </body>
</html>